<include file="Public:Header" />

<body>
    <include file="Public:Nav" /><span id="result"></span>
    <div class="container">
        <!--内容开始-->
        <div class="page-header">
            <h3>{$Think.lang.Write}</h3>
        </div>
        <div class="MiniBox2">
            <form role="form" method="post" action="{:U('addcontent')}" enctype="multipart/form-data">
                <div class="MiniBox2_left">
                    <input type="text" class="form-control miniinput" placeholder="{$Think.lang._title_}" name="title" />
                </div>
                <div class="MiniBox2_rifht">
                    <select class="form-control miniinput2" name="cid">
                        <foreach name='cate' item='v'>
                            <option value="{$v.cid}">{$v.html}{$v.cname}</option>

                        </foreach>
                    </select>
                </div>
                <textarea class="form-control miniinput3" rows="20" id="editor_id" name="content"></textarea>
                <div id="write_high">
                    <div class="overflow">
                        <input size="16" type="text" class="form-control form_datetime" placeholder="{$Think.lang._date_}" name="time" value="<?php date_default_timezone_set(PRC); echo date("Y-m-d G:i:s"); ?>">
                        <input type="text" class="form-control miniinput4" placeholder="{$Think.lang._key_}" name="tag">
                        <input type="text" class="form-control miniinput8" value="1" name="click">
                        <div class="miniinput10">
                            <input type="radio" name="hot" value="1" id="optionsRadios1" checked>&nbsp;{$Think.lang._default_}&nbsp;
                            <input type="radio" name="hot" value="0">&nbsp;{$Think.lang._stick_}</div>
                    </div>
                    <div class="form-group">
                        <input class="miniinput9" name="img" id="img" type="file">
                    </div>
                    <textarea class="form-control miniinput3" rows="3" name="summary" id="zhaiyao" placeholder="{$Think.lang._summary_}"></textarea>
                </div>

                
                <button type="submit" class="btn btn-info minibtn">{$Think.lang._release_}</button>
                <div class="btn-group">
                    <button type="button" class="btn btn-info minibtn dropdown-toggle" data-toggle="dropdown">{$Think.lang._choice_} <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="#" id="reset">{$Think.lang._rewrite_}</a>
                        </li>
                        <li> <a href="#" id="write_high_open">{$Think.lang._senior_}</a>
                            <a href="#" id="write_high_close">{$Think.lang._close_}</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <!--内容结束-->
        <include file="Public:Copy" />
    </div>


    <script charset="utf-8" src="[!Public]editor/kindeditor.js"></script>
    <script charset="utf-8" src="[!Public]editor/lang/zh-cn.js"></script>
    <script>
        var editor;
        KindEditor.ready(function(K) {
            editor = K.create('textarea[name="content"]', {
                uploadJson: '[!Public]editor/php/upload_json.php',
                fileManagerJson: '[!Public]editor/php/file_manager_json.php',
                themeType: 'simple',
                  langType:'{$Think.config.LANG_LIST}', 
                allowFileManager: false,
                allowPreviewEmoticons: true, 
                allowImageUpload: true,
                afterBlur: function() {
                    this.sync();
                },
                items: ['source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste', 'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript', 'superscript', 'title', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image', 'flash', 'media', 'advtable', 'emoticons', 'link', 'unlink', '|', 'baidumap', 'code', 'about'],
            });
        });
    </script>

    <script>
        $("#reset").click(function() {
            $("input, #zhaiyao").val("");
            editor.html('');
        });
        $("#write_high_open").click(function() {
            $("#write_high").fadeIn();
            $("#write_high_open").hide(1);
            $("#write_high_close").show(1);
        });
        $("#write_high_close").click(function() {
            $("#write_high").hide();
            $("#write_high_close").hide(1);
            $("#write_high_open").show(1);
        });
    </script>
  
    <script>
	
	$('#password').modal(options);
    $('#example').popover(options);
    
    </script>
    </html>